package com.hsogoo.avatar.transport;

import com.hsogoo.avatar.model.AvatarAddress;
import com.hsogoo.avatar.transport.listener.OperationListener;

/**
 * @Author huangsaigang
 * Created @2018/9/29.
 */
public abstract class AvatarConnection {

    private final AvatarAddress address;

    protected AvatarChannel channel;

    public AvatarConnection(AvatarAddress address) {
        this.address = address;
    }

    public AvatarAddress address(){
        return address;
    }

    public AvatarChannel channel() {
        return channel;
    }

    public void operationComplete(@SuppressWarnings("unused") OperationListener operationListener) {
        // the default implementation does nothing
    }

    public abstract void setReconnect(boolean reconnect);
}
